Optimal. Leaf size=14 \[ \text {ArcTan}\left (\frac {\cot (x)}{\sqrt {-\csc ^2(x)}}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 14, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3738, 4207,
223, 209} \begin {gather*} \text {ArcTan}\left (\frac {\cot (x)}{\sqrt {-\csc ^2(x)}}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 223
Rule 3738
Rule 4207
Rubi steps
\begin {align*} \int \sqrt {-1-\cot ^2(x)} \, dx &=\int \sqrt {-\csc ^2(x)} \, dx\\ &=\text {Subst}\left (\int \frac {1}{\sqrt {-1-x^2}} \, dx,x,\cot (x)\right )\\ &=\text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\frac {\cot (x)}{\sqrt {-\csc ^2(x)}}\right )\\ &=\tan ^{-1}\left (\frac {\cot (x)}{\sqrt {-\csc ^2(x)}}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(30\) vs. \(2(14)=28\).
time = 0.02, size = 30, normalized size = 2.14 \begin {gather*} \frac {\csc (x) \left (\log \left (\cos \left (\frac {x}{2}\right )\right )-\log \left (\sin \left (\frac {x}{2}\right )\right )\right )}{\sqrt {-\csc ^2(x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.13, size = 15, normalized size = 1.07
method | result | size |
derivativedivides | \(\arctan \left (\frac {\cot \left (x \right )}{\sqrt {-1-\left (\cot ^{2}\left (x \right )\right )}}\right )\) | \(15\) |
default | \(\arctan \left (\frac {\cot \left (x \right )}{\sqrt {-1-\left (\cot ^{2}\left (x \right )\right )}}\right )\) | \(15\) |
risch | \(-2 \sqrt {\frac {{\mathrm e}^{2 i x}}{\left ({\mathrm e}^{2 i x}-1\right )^{2}}}\, \ln \left ({\mathrm e}^{i x}+1\right ) \sin \left (x \right )+2 \sqrt {\frac {{\mathrm e}^{2 i x}}{\left ({\mathrm e}^{2 i x}-1\right )^{2}}}\, \ln \left ({\mathrm e}^{i x}-1\right ) \sin \left (x \right )\) | \(60\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.53, size = 17, normalized size = 1.21 \begin {gather*} -\arctan \left (\sin \left (x\right ), \cos \left (x\right ) + 1\right ) + \arctan \left (\sin \left (x\right ), \cos \left (x\right ) - 1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] Result contains complex when optimal does not.
time = 2.70, size = 19, normalized size = 1.36 \begin {gather*} i \, \log \left (e^{\left (i \, x\right )} + 1\right ) - i \, \log \left (e^{\left (i \, x\right )} - 1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sqrt {- \cot ^{2}{\left (x \right )} - 1}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [C] Result contains complex when optimal does not.
time = 0.43, size = 11, normalized size = 0.79 \begin {gather*} i \, \log \left ({\left | \tan \left (\frac {1}{2} \, x\right ) \right |}\right ) \mathrm {sgn}\left (\sin \left (x\right )\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.39, size = 14, normalized size = 1.00 \begin {gather*} \mathrm {atan}\left (\frac {\mathrm {cot}\left (x\right )}{\sqrt {-{\mathrm {cot}\left (x\right )}^2-1}}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________